21 January 2023

Random Number Tables

What are random number tables?

(Still Figure - Image)

Eight years ago, a Redditor was stunned after discovering his math book had a mysterious able of random numbers!

Turns out that…
A long time ago in a galaxy not so far away…. people had no computers. If they wanted to sample a random number, they had to use random number tables.

Tell me more

(Bullet Points in 2 Columns)

  • Used to draw random samples

  • Said to be more effective than using dice or cards

  • Became replaced by random number generators

  • Archaeologists and historians of statistics are trying to decipher how exactly random number tables were used

What did they look like?

(Still Figure - Knitr & KableExtra table)

91418 56200 50739 93661 90459
93400 75556 74001 97062 22345
35466 21985 93186 20456 98011
83910 68472 32733 52275 94253
67115 72751 51144 59870 17337

Table 1: An example of a random number table. Shocking indeed.

A Non-Random Table

(Static Figure - Pandoc Table)

1 2
3 4
5 6
7 8

Table 2: A not-so-random table.

What is Random? (Embedded Video)

Interact with Randomness I

(Interactive Table)

Interact with Randomness II

(Interactive Plot)

Formula for Randomness?

There is no math formula for generating truly random numbers.

Instead, I share some formulas for the continuous uniform distribution from which we have been sampling today.

\[\begin{align} f(x) = \begin{cases} \frac{1}{b-a} & \text{for } a \leq x \leq b \ 0 & \text{for } x < a \text{ or } x > b \end{cases} \\ f(x) = \begin{cases} \frac{1}{2\sigma\sqrt{3}} & \text{for } -\sigma\sqrt{3}\leq x - \mu \leq \sigma\sqrt{3} \\ 0 \text{ otherwise}\end{cases} \end{align}\]

  • The first formula is the probability density function
  • The second formula is the probability density expressed in terms of mean and variance \(\sigma^2\) (“Continuous uniform distribution”, 2023)

Code for Sampling the Uniform Distribution

(Displayed but not Executed)

# set seed if you want
set.seed(42)

# sample 10  continuous values between 100 and a hundred
runif(10, 100, 999) 

# sample discrete values
round(runif(10, 100, 999),0)

Bibliography